package com.bsc.rtc.lib.libraries.RxJavaRetrofitDemo.SelfRxJava;

public class TestRxJava {
    public static void main(String[] args) {
        Observable.create(new Observable.OnSubscribe<Integer>() {
            @Override
            public void call(Subscriber<? super Integer> subscriber) {
                for (int i = 0; i < 10; i++) {
                    subscriber.onNext(i);
                }

            }
        }).subscribe(new Subscriber<Integer>(){
            @Override
            public void onComplete() {

            }

            @Override
            public void onErrot(Throwable t) {

            }

            @Override
            public void onNext(Object o) {
                System.out.println(o);
            }

            @Override
            public void onStart() {
                super.onStart();
            }
        });
    }
}
